$(function () {
    obj.init();
});

var obj = new function () {
    'use strict';
    return {
        dataGrid: null,
        userId:null,
        params: {
        },
        init: function () {
            this.userId = xhTool.getQuery('userId');
            this.listener();
        },
        listener: function () {
            var $this = this;
            var histroyHtml='';
            xhExtra.ajaxRequest('User/getHistory' , {id: $this.userId}, {}, function(data) {
                 $.each(data, function (i, history) {
                     histroyHtml +="<tr bgcolor=\"#ffffff\"><td>"+history.iYear+"</td>\n" +
                         "        <td>"+history.sSchoolName+"</td>\n" +
                         "        <td>"+history.sGrade+"</td>\n" +
                         "        <td>"+history.tCreateDate+"</td>\n" +
                         "        <td>"+history.tInTime+"</td>\n" +
                         "        <td>"+history.tOutTime+"</td></tr>"
                 });
                 $("#deviceHistory").append(histroyHtml);
            });
        },
        funObj: function () {
            var $this = this;
            return {
            }
        }
    }
};